<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<a class="btn btn-navbar" data-toggle="collapse"
				data-target=".nav-collapse"> <span class="icon-bar"></span> <span
				class="icon-bar"></span> <span class="icon-bar"></span>
			</a> <a class="brand" href='<c:url value="/home.html" />'>KOR</a>

			<div class="nav-collapse collapse">
				<ul class="nav" id="menu">
					<li id="p1"><a href='<c:url value="/p1/main.html" />'>Zapytania
							#1</a></li>
					<li id="p2"><a href='<c:url value="/p2/main.html" />'>Zapytania #2</a></li>
					<li id="p3"><a href='<c:url value="/p3/main.html" />'>Zapytania #3</a></li>
					<li id="p4"><a href='<c:url value="/p4/main.html" />'>Zapytania #4</a></li>
					<li id="dev"><a href='<c:url value="/dev/main.html" />'>Zapytania dev</a></li>
				</ul>
				<script>
					$(function() {
						if(new RegExp(".*p1.*").test(window.location.href)) {
							$('#p1').attr('class', 'active');
						} else if(new RegExp(".*p2.*").test(window.location.href)) {
							$('#p2').attr('class', 'active');
						} else if(new RegExp(".*p3.*").test(window.location.href)) {
							$('#p3').attr('class', 'active');
						} else if(new RegExp(".*dev.*").test(window.location.href)) {
							$('#dev').attr('class', 'active');
						} else {
							if(console) {
								console.log('nothing active');
							}
						}
					});	
				</script>
			</div>
		</div>
	</div>
</div>